package org.toycode.solr.entity;

import org.toycode.solr.entity.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Dummy entity.
 *
 * @author <a href="mailto:DL88250@gmail.com">Liang Ding</a>
 * @version 1.0.0.4, Aug 27, 2009
 */
public class Dummy2 extends AbstractEntity implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long id;
    private String leadName;
    private List<String> strings;

    public Dummy2() {
        strings = new ArrayList<String>();

        for (int i = 0; i < 2; i++) {
            strings.add("string " + i);
        }
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public List<String> getStrings() {
        return strings;
    }

    public void setStrings(List<String> strings) {
        this.strings = strings;
    }

    public String getLeadName() {
        return leadName;
    }

    public void setLeadName(String leadName) {
        this.leadName = leadName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        if (!(object instanceof Dummy2)) {
            return false;
        }
        Dummy2 other = (Dummy2) object;
        if ((this.id == null && other.id != null) || (this.id != null &&
                                                      !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "ory.toycode.solr.entity.Dummy2[id=" + id + "]";
    }
}
